package cn.smbms.dao;

import cn.smbms.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {

    List<User> list(@Param(value = "beginIndex") Integer beginIndex
            , @Param(value = "pageSize") Integer pageSize
            , @Param(value = "username") String username
            , @Param(value = "userRole") Integer userRole);

    int count(@Param(value = "username") String username
            , @Param(value = "userRole") Integer userRole);

    int add(User user);

    User findUserByUserCode(String userCode);

    User findUserById(Integer id);

    int update(User user);
}
